﻿<UserControl x:Class="YouTubePlaylist.Views.PlaylistCtrl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:SharedLibrary="clr-namespace:Radovici.SharedLibrary;assembly=RadoviciSharedLibrary"
    xmlns:Views="clr-namespace:YouTubePlaylist.Views"
    xmlns:ContentControls="clr-namespace:Radovici.Ctrls.ContentControls;assembly=RadoviciCtrls">
    <UserControl.Resources>
        <SharedLibrary:BooleanToVisibilityConverter x:Key="ToVisibilityConverter"/>
        <Style x:Name="WhiteBodyStyle" TargetType="TextBlock">            
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="FontSize" Value="10"/>
        </Style>
        <Style x:Name="WhiteHeaderStyle" TargetType="TextBlock">
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="FontSize" Value="16"/>
        </Style>
    </UserControl.Resources>
    <ContentControls:DropTarget TargetDataContext="{Binding PlaylistModel}">
        <Grid Visibility="{Binding PlaylistModel.CanAddTracks, Converter={StaticResource ToVisibilityConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Views:YouTubePlayerCtrl x:Name="Player" Grid.Row="0" HorizontalAlignment="Center"/>
            <Views:PlaylistToolbarCtrl Grid.Row="1"/>
            <Views:TracksCtrl Grid.Row="2"/>
        </Grid>
    </ContentControls:DropTarget>
</UserControl>
